package cn.jtfadmin.core.modules.sys.controller;

import cn.jtfadmin.base.lang.common.domain.dto.ResultDTO;
import cn.jtfadmin.core.modules.sys.domain.dto.SysInitPDTO;
import cn.jtfadmin.core.modules.sys.service.SysInitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后管-sys系统初始化controller
 *
 * @author jtf
 * @since 1.0
 */
@RestController
public class SysInitController {

    @Autowired
    private SysInitService sysInitService;

    /**
     * 系统权限初始化
     *
     * @param sysInitPDTO 初始化参数
     * @return
     */
    @PostMapping(value = "/common/sys/init")
    public ResultDTO<String> sysInit(@RequestBody SysInitPDTO sysInitPDTO) {
        sysInitService.sysInit(sysInitPDTO);
        return ResultDTO.success();
    }

}
